/**
 * Desenvolvido pela Fábrica de Software do CESUPA.
 * Todos os direitos reservados.
 */
package br.cesupa.fabsoft.nomedoprojeto.modules.helpmodule.entities;

/**
 *
 * @author Breno Leite
 */
public class SearchResult implements Comparable<SearchResult> {

    private float score;
    private HelpTopic relatedHelpTopic;

    /**
     * @return the score
     */
    public float getScore() {
        return score;
    }

    /**
     * @param score the score to set
     */
    public void setScore(float score) {
        this.score = score;
    }

    public int compareTo(SearchResult searchResult) {
        if (this.getScore() < searchResult.getScore()) {
            return -1;
        }

        if (this.getScore() > searchResult.getScore()) {
            return 1;
        }

        return 0;
    }

    /**
     * @return the relatedHelpTopic
     */
    public HelpTopic getRelatedHelpTopic() {
        return relatedHelpTopic;
    }

    /**
     * @param relatedHelpTopic the relatedHelpTopic to set
     */
    public void setRelatedHelpTopic(HelpTopic relatedHelpTopic) {
        this.relatedHelpTopic = relatedHelpTopic;
    }
}